         **************************************************************
         *   Lunar: Eternal Blue (Sega CD) - Un-Worked Design Patch   *
         *                 Version 3 (24 Feb. 2017)                   *
         *            by Supper (suppertails66@gmail.com)             *
         **************************************************************

This is a patch that fixes many issues introduced in the US version of the Sega 
CD game Lunar: Eternal Blue by its publisher, Working Designs. As you're 
probably aware if you're reading this, the US release of the game was heavily 
bastardized; in the most prominent of its many ill-conceived changes to 
gameplay, the save system was purposely crippled and the enemy stats were 
massively jacked up, turning parts of the game into a tedious and frustrating 
grindfest. This patch aims to restore these and other alterations to their 
original form from the Japanese version.

              ****************************************************
              *                     Changes                      *
              ****************************************************

* All enemies have their stats restored to what they were in the Japanese 
version. (The US version increases most enemies' HP by 25% or more, and also 
drastically increases many enemies' Attack and/or Defense).
* Saving no longer costs Magic EXP.
* Items that were made more expensive in the US version now cost the original 
amounts.
* Spells that had their MP costs raised in the US version have been restored to 
the original costs.
* The Althena statues that require donations to use have had their fees reduced 
to the original amounts. (All but one were originally 100s per use.)
* The mayor of Larpa's information fee has been restored from 500s to the 
original 30s.
* The replaced music in the Star Dragon Tower has been removed.
* The swapped icons for the Heal Litany and Calm Litany spell lines have been 
reverted.
* Various bits of censorship done to meet Sega of America's content policies 
have been undone:
  * The minor changes to the nude shots of Lucia in the opening cutscene have 
been reverted.
  * All pentagrams (large and small teleport pads, Magic Shield icon, various 
battle animations) have been restored.
  * The nude shot of Luna in the flashback to The Silver Star (which was edited 
in that game as well) has been restored.
  * Plantarium/Plantella's nudity has been restored.
* Though not technically a "restoration", all text has been converted to proper 
mixed case instead of all-caps, and has been proofread to remove the most 
egregious errors. Since the game's original English font didn't look very good 
with combined upper and lower case letters, it's also been tweaked a bit to 
hopefully look better. 

Other changes in the US version (e.g. the default setting of the "A/C Button 
Swap" option, the altered background for window type 2, the horrible horrible 
made-up script) have been kept.

For specific details on the alterations in the US version, such as tables of 
stat changes and so on, see this page: 
https://tcrf.net/Lunar:_Eternal_Blue/Regional_Differences

              ****************************************************
              *               Patching Instructions              *
              ****************************************************

--- WHAT YOU'LL NEED ---
* A BIN/CUE or ISO/WAV format disc image of the US version of Lunar: Eternal 
Blue (Sega CD).
* If you're on Windows, the xdelta patching utility (http://xdelta.org/) is 
provided in this distribution. On other platforms, you'll need to acquire 
version 3.0.8 or later on your own.

--- AUTOMATIC PATCHING METHOD (WINDOWS) ---

If you're using Windows, move your disc image files into the same directory as 
the program and do one of these as appropriate:
  * If you have a BIN/CUE disc image, drag and drop the BIN file (or IMG file) 
onto binpatch.bat.
  * If you have an ISO/WAV disc image, drag and drop the ISO file onto 
isopatch.bat. Note that your ISO/WAV files must use standard naming and 
numbering, e.g. "File 01.iso", "File 02.wav", etc.

If everything works, this should produce the patched game under the name 
"LunarEternalBlueUnWorked_##". To play it, make sure the file 
"LunarEternalBlueUnWorked.cue" (included with the patch) is in the same 
directory as everything else and then load it in an emulator, or burn it to a CD 
for use on real hardware.

If this doesn't work, try using the manual patching method below to diagnose the 
problem.

--- MANUAL PATCHING METHOD---

--- CONVERTING FROM BIN/CUE TO ISO ---
If you have a BIN/CUE image (or the equivalent IMG/CUE), you'll need to convert 
it to ISO/WAV before you can patch it. I'd recommend using BinChunker (a.k.a. 
bchunk -- homepage http://he.fi/bchunk/) to do this.

* On Windows, you can use the included bchunk.exe (courtesy of elmer). If you 
don't want to use bchunk, there are also many "shareware"/commercial utilities 
that can do this task, though they may or may not output the same ISO as bchunk.
* On Linux, it should be available from your distro's repos, or of course you 
can build from source.
* On Mac, you can build from source, or perhaps get binaries wherever Mac people 
get their binaries from.

To convert, open a command prompt and navigate to the folder containing the 
BIN/CUE, then run the following command:

bchunk -w LunarEternalBlueUS.bin LunarEternalBlueUS.cue LunarEternalBlueUS_

(substituting the names of your BIN/CUE files, obviously -- remember to put 
quotes around them if they have spaces in them. **Don't rename them** -- this 
will cause the conversion to fail unless you also modify the CUE file itself.) 
This should generate three files: LunarEternalBlueUS_01.iso, 
LunarEternalBlueUS_02.wav, and LunarEternalBlueUS_03.wav.

--- PATCHING STEPS---
1. First, !!!***verify that your ISO has the correct MD5 hash***!!! It should be 
1fab8a8b2d83627ba0c6591e02b451ce. If it isn't, the patch almost certainly won't 
work. You can obtain this by using the md5sum utility on *nix, or the FCIV 
utility (https://support.microsoft.com/en-us/kb/889768) on Windows.

2. Use xdelta to apply LunarEternalBlueUnWorked.xdelta to your ISO. If you're 
using the command line, this would look something like:

xdelta3 -d -s LunarEternalBlueUnWorked.xdelta LunarEternalBlueUS_01.iso 
LunarEternalBlueUnWorked_01.iso

If you use a GUI wrapper, it should be self-explanatory, but make sure the 
output file is named LunarEternalBlueUnWorked_01.iso.

3. That's technically all the patching required, but assuming you want to play 
on an emulator, we now need to make sure the CD audio files are properly 
associated with the ISO or it will likely hang when it needs to play them. 
First, make sure your patched ISO is named LunarEternalBlueUnWorked_01.iso, then 
rename the audio files produced from the BIN/CUE conversion process to 
LunarEternalBlueUnWorked_02.wav and LunarEternalBlueUnWorked_03.wav.

4. A CUE file named LunarEternalBlueUnWorked.cue is included with this patch. 
Move it to the same directory as your ISO and WAV files.

5. Test that the game works by loading LunarEternalBlueUnWorked.cue in your 
emulator. Press A, B, or C at the BIOS startup screen to start the CD player, 
and make sure the number of tracks listed is 3.

--- TROUBLESHOOTING ---
* If the patched ISO won't run, check the MD5 hash of your original ISO. The 
correct hash is given in step 1 above. If either of them doesn't match, try a 
different method for converting the BIN/CUE to ISO, or using a BIN/CUE generated 
by a different program.
* If loading LunarEternalBlueUnWorked.cue doesn't work, try loading 
LunarEternalBlueUnWorked_01.iso by itself. If that works, make sure all your 
files are named exactly as described above, and that the names in the CUE file 
match your audio files. CUE files are plaintext; just open it in Notepad or 
whatever.
* If your ISO has associated sound files in some format other than WAV (or your 
emulator doesn't support WAV files), you'll need to either convert them to WAV 
or modify the CUE file to use a different format. In the latter case, change 
(for example) all occurences of WAVE to MP3, and make sure the filenames are 
correct.
* If the game works fine but crashes at the ending credits, your audio files 
aren't properly associated with the ISO. Check that your filenames match what's 
described in LunarEternalBlueUnWorked.cue.

              ****************************************************
              *                  Known Issues                    *
              ****************************************************

* The "Save" and "Load" options are in all caps on the relevant menus because of 
a quirk in how they're implemented (the same "SAVE" and "LOAD" strings are 
recycled for multiple purposes).

              ****************************************************
              *                 Version History                  *
              ****************************************************
  
Version 3 (2/24/17)
  Major update that reverts a large number of changes in the US version that I 
wasn't previously aware of, in addition to fixing a few patch issues.
  * Swapped back the Heal Litany/Calm Litany spell icons
  * Removed remaining SoA-mandated graphics censorship:
    * Pentagrams (Magic Shield spell icon, large and small teleport pads, "magic 
circle" spell animations)
    * Plantella/Plantarium
    * Luna flashback
  * Restored Althena statue donation amounts
  * Restored the Larpa mayor's fee amount
  * After much handwringing, I chose to remove the new Star Dragon Tower music 
and replace it with the recycled Blue Tower theme that was originally used 
there. Honestly, I love Bill King's music and I have nothing against the track 
itself, but it's a violation of authorial intent (lazy though that intent may 
have been) and I can't leave it in in good conscience.
  * Ported the tweaked font I originally made for the The Silver Star patch to 
this game
  * Fixed an issue that caused several dialogue choice boxes to display spurious 
"blank" options
  * Finally found and converted to mixed case the text for the Ghaleon fight in 
Pentagulia Shrine
  * Further revised the script, fixing a few text box overflows and grammatical 
issues, as well as adjusting capitalization here and there
  * Due to a complaint, I've put the obnoxious Working Designs credits, which 
were previously removed as a side effect of my sloppy editing work, back in the 
opening cutscene.
  * One JP->US change I've purposely left as-is in this version is the altered 
background for window type 2. The US version is much darker than any of the 
other backgrounds, and from an accessibility standpoint, it's better to offer a 
high-contrast option for those that might want or need it. I suspect 99% of 
players will never change from the default background anyways.
  
Version 2 (1/28/17)
  * Fixed a bug with Ronfar's dialogue at the Larpa Tavern that caused a crash. 
(Thanks to butane bob for reporting this.)

Version 1 (1/24/17)
  * Replaced the original patch, which was made using a badly outdated version 
of xdelta, with a new one made with xdelta 3.0.8.
  * Patch distribution now bundles xdelta3.exe and a special bugfixed version of 
bchunk.exe provided by elmer.
  * Added automatic patching method for Windows.

Version 0 (1/16/17)
  * Initial release.

              ****************************************************
              *                  Special Thanks                  *
              ****************************************************

* Many thanks to elmer for pointing out that the initial version of the patch 
was made with an ancient release of xdelta, and for creating and providing 
permission to include in this distribution the bugfixed version of bchunk.exe.
* vivify93, for help with the tweaked font and general support
* GHANMI, for extracting and sending me the Grandia font to use as a reference 
for the font improvements (even though I wound up not using it), as well as 
providing a great deal of moral support
* LunarNET, for bringing to my attention several changes in the US version I 
wasn't previously aware of
* butane bob, for reporting a crash introduced in the patch
* Everyone on ROMhacking.net who provided feedback and support
